<img ng-show="loadingTasks" style="width:25px;height:25px" alt="{{ Main_Loading }}" src="assets/img/ajax-loader.gif" />
<div class="widget-box" id="recent-box" ng-hide="loadingTasks">
	<div class="widget-header header-color-blue">
		<div class="row">
			<div class="col-sm-3">
				<button ng-click="addNewClicked=!addNewClicked;" class="btn btn-sm btn-danger header-elements-margin"><i class="glyphicon  glyphicon-plus"></i>{{ Tasks_AddTask }}</button>
			</div>
			<div class="col-sm-3">
				<input type="text" ng-model="filterTask" class="form-control search header-elements-margin" placeholder="{{ Main_Filter }}">
			</div>
		</div>
	</div>
	<div class="widget-body ">
		<form ng-init="addNewClicked=false;" ng-if="addNewClicked" id="newTaskForm" class="add-task">
			<div class="form-actions">
				<div class="row form-group">
					<div class="col-xs-6">
						<input type="text" class="form-control" name="comment" ng-model="taskInput" placeholder="Nom de la tâche" ng-focus="addNewClicked" />
					</div>
					<div class="col-xs-4">
						<img ng-show="loadingUsers" style="width:25px;height:25px" alt="{{ Main_Loading }}" src="assets/img/ajax-loader.gif" />
						<select ng-hide="loadingUsers" class="form-control" data-ng-options="user as user.Firstname + ' ' + user.Lastname for user in users" data-ng-model="assigneeUser"></select>
					</div>
					<button class="btn btn-default" type="submit" ng-click="addTaskCommand(taskInput, assigneeUser)"><i class="glyphicon glyphicon-plus"></i>{{ Main_Add }}</button>
				</div>
			</div>
		</form>
		<img ng-show="loadingTasks" style="width:25px;height:25px" alt="{{ Main_Loading }}" src="assets/img/ajax-loader.gif" />
		<div class="task" ng-show="!loadingTasks">
			<label class="checkbox" ng-repeat="task in tasks | filter : filterTask">
			<input 
			type="checkbox"
			value="{{ task.State }}"
			ng-checked="task.State==1"
			ng-click="updateStatusCommand(task)"/> 
			<span ng-class="{strike:task.State==1}">#{{ task.Id }} {{ task.Name }}</span>
			<a ng-click="deleteTaskCommand(task)" class="pull-right" style="cursor:pointer;"><i class="glyphicon glyphicon-trash"></i></a>
			</label>
		</div>
	</div>
</div>